package com.wx.nchu_mall.config;

import com.wx.nchu_mall.interceptor.JWTInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceporConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor((new JWTInterceptor()))
                .addPathPatterns("/api/**")
                .excludePathPatterns("/api/login","/api/regist","/api/getCode","/api/customer/commodity/find","/api/customer/commodity/findDetail","/api/customer/commgory/findList1" );
    }
}
